<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //find() 方法返回数组中满足提供的测试函数的第一个元素的值。否则返回 undefined。

      (function () {
        const array1 = [1, 21, 18, 130, 22];
        const found = array1.find((element) => element > 10);
        console.log(found); //21
      })();
    </script>
  </body>
</html>
